﻿<html>
<head>
<title>Last 10 IDs</title>
</head>
<?php include 'layout.php'; ?> 

	<div id="content">
	<body><?php
	 echo "<p>Last ten IDs</p>";
	 echo "<table border='1'><tr>";
	 echo "<td>Num</td><td>ID</td><td>Project</td><td>Status</td><td>Time</td></tr>";
	 $i=0;
	$db = mysql_connect("mysql513.in.shared-server.net:16033", "JRtu434", "qvoiceDB1");
	mysql_select_db("JRtu434", $db);
	$res = mysql_query("Select testredirect.ID,name,status,end from testredirect,projects where testredirect.rid=projects.rid order by end DESC limit 10");

	while($row = mysql_fetch_array($res))
	{
	$i = $i+1;
	echo "<tr><td>".$i."</td><td>" . $row['ID'] . "</td><td>" . $row['name'] . "</td><td>" . $row['status'] . "</td><td>" . strftime('%X',$row['end']) ."</td></tr>";
	}
	echo "</table>";
	mysql_close();
?></div>
</body>

</html> 
